package com.hailian.fintech.hlhouse_statusserver.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author hanbo
 * @since 2020-06-01
 */
@Data
@Accessors(chain = true)
@TableName("hl_area")
public class Area extends Model<Area> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String name;

    private Integer pid;

    /**
     * 存省市县数据
     */
    @TableField(exist = false)
    private List<Area> subAreaList;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
